# coding: utf-8
from marshmallow import Schema, fields
from model.model_base import Base
from sqlalchemy import Column, String, Integer, Numeric


class RepeatProRep(Base):
    # 重复处理问题统计表
    __tablename__ = 'RepeatProRep'
    bureauid = Column(String(2), primary_key=True,comment='供电局编号')
    bureauname = Column(String(50), nullable=True,comment='供电局名称')
    openid = Column(String(128), primary_key=True,comment='统计人openID')
    meter_number = Column(Integer, nullable=True,comment='处理电能表总数量')
    repeat_meter_number = Column(Integer, nullable=True, comment='重复处理电能表总数量')
    repeat_percent = Column(Numeric(5, 2), nullable=True, comment='重复处理电能表占比')


class RepeatProRepSchema(Schema):
    bureauid = fields.String()
    bureauname = fields.String()
    openid = fields.String()
    meter_number = fields.Integer()
    repeat_meter_number = fields.Integer()
    repeat_percent = fields.Number()


repeatProRepSchema = RepeatProRepSchema()
